package com.ruoyi.material.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 材料采购记录对象 materia_purchase_record
 *
 * @author liboyu
 * @date 2024-06-16
 */
public class MateriaPurchaseRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 材料供应链管理主键 */
    private Long purchaseRecordId;

    /** 材料主键 */
    @Excel(name = "材料主键")
    private Long materiaId;

    /** 供应商主键 */
    @Excel(name = "供应商主键")
    private Long supplierId;

    /** 项目主键 */
    @Excel(name = "项目主键")
    private Long projectId;

    /** 计划到场时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "计划到场时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date planDate;

    /** 计划到场 */
    @Excel(name = "计划到场")
    private String planQuantity;

    /** 已到场 */
    @Excel(name = "已到场")
    private String alreadyQuantity;

    /** 状态-已到场,未下单,下单中,生产中,运输中,已到场50% */
    @Excel(name = "状态-已到场,未下单,下单中,生产中,运输中,已到场50%")
    @NotBlank(message = "状态不能为空")
    @Length(min = 1, max = 50)
    private String status;

    /** 采购时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "采购时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date purchaseDatetime;

    /** 负责人 */
    @Excel(name = "负责人")
    @NotNull
    private String reponsibleName;

    /** 电话 */
    @Excel(name = "电话")
    @NotBlank(message = "电话不能为空")
    @Pattern(regexp = "^1[2-9]\\d{9}$", message = "电话号码格式不正确")
    private String reponsibleTel;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @NotBlank(message = "备注不能为空")
    @Length(min = 1, max = 200)
    private String remark;

    /**
     * 材料名称
     */
    private String materiaName;

    /**
     * 材料规格
     */
    private String materiaStandard;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 材料类型主键
     */
    private Long materiatypeId;

    /**
     * 材料类型pid
     */
    private String materiatypePid;

    /**
     * 项目名
     */
    private String projectName;

    /**
     * 变化前的已到场数量
     */
    private Integer alreadyQuantityBefore;

    /**
     * 登录用户主键
     */
    private Long userId;

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("MateriaPurchaseRecord{");
        sb.append("purchaseRecordId=").append(purchaseRecordId);
        sb.append(", materiaId=").append(materiaId);
        sb.append(", supplierId=").append(supplierId);
        sb.append(", projectId=").append(projectId);
        sb.append(", planDate=").append(planDate);
        sb.append(", planQuantity='").append(planQuantity).append('\'');
        sb.append(", alreadyQuantity='").append(alreadyQuantity).append('\'');
        sb.append(", status='").append(status).append('\'');
        sb.append(", purchaseDatetime=").append(purchaseDatetime);
        sb.append(", reponsibleName='").append(reponsibleName).append('\'');
        sb.append(", reponsibleTel='").append(reponsibleTel).append('\'');
        sb.append(", remark='").append(remark).append('\'');
        sb.append(", materiaName='").append(materiaName).append('\'');
        sb.append(", materiaStandard='").append(materiaStandard).append('\'');
        sb.append(", supplierName='").append(supplierName).append('\'');
        sb.append(", materiatypeId=").append(materiatypeId);
        sb.append(", materiatypePid='").append(materiatypePid).append('\'');
        sb.append(", projectName='").append(projectName).append('\'');
        sb.append(", alreadyQuantityBefore=").append(alreadyQuantityBefore);
        sb.append(", userId=").append(userId);
        sb.append('}');
        return sb.toString();
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getAlreadyQuantityBefore() {
        return alreadyQuantityBefore;
    }

    public void setAlreadyQuantityBefore(Integer alreadyQuantityBefore) {
        this.alreadyQuantityBefore = alreadyQuantityBefore;
    }

    public String getProjectName() {
        return projectName;
    }

    public void setProjectName(String projectName) {
        this.projectName = projectName;
    }

    public String getMateriatypePid() {
        return materiatypePid;
    }

    public void setMateriatypePid(String materiatypePid) {
        this.materiatypePid = materiatypePid;
    }

    public Long getMateriatypeId() {
        return materiatypeId;
    }

    public void setMateriatypeId(Long materiatypeId) {
        this.materiatypeId = materiatypeId;
    }

    public Long getPurchaseRecordId() {
        return purchaseRecordId;
    }

    public void setPurchaseRecordId(Long purchaseRecordId) {
        this.purchaseRecordId = purchaseRecordId;
    }

    public Long getMateriaId() {
        return materiaId;
    }

    public void setMateriaId(Long materiaId) {
        this.materiaId = materiaId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getProjectId() {
        return projectId;
    }

    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    public Date getPlanDate() {
        return planDate;
    }

    public void setPlanDate(Date planDate) {
        this.planDate = planDate;
    }

    public String getPlanQuantity() {
        return planQuantity;
    }

    public void setPlanQuantity(String planQuantity) {
        this.planQuantity = planQuantity;
    }

    public String getAlreadyQuantity() {
        return alreadyQuantity;
    }

    public void setAlreadyQuantity(String alreadyQuantity) {
        this.alreadyQuantity = alreadyQuantity;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getPurchaseDatetime() {
        return purchaseDatetime;
    }

    public void setPurchaseDatetime(Date purchaseDatetime) {
        this.purchaseDatetime = purchaseDatetime;
    }

    public String getReponsibleName() {
        return reponsibleName;
    }

    public void setReponsibleName(String reponsibleName) {
        this.reponsibleName = reponsibleName;
    }

    public String getReponsibleTel() {
        return reponsibleTel;
    }

    public void setReponsibleTel(String reponsibleTel) {
        this.reponsibleTel = reponsibleTel;
    }

    public String getMateriaName() {
        return materiaName;
    }

    public void setMateriaName(String materiaName) {
        this.materiaName = materiaName;
    }

    public String getMateriaStandard() {
        return materiaStandard;
    }

    public void setMateriaStandard(String materiaStandard) {
        this.materiaStandard = materiaStandard;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }
}
